#!    /usr/local/bin/lua

Person = {}
function Person:new(p)
    obj = p or { name = 'haha', age = 11, height = 11 }
    self.__index = self
    return setmetatable(obj, self)
end

function Person:toString()
    return self.name .. ':' .. self.age .. ':' .. (self.height)
end

me = Person:new()
print(me:toString())

me2 = Person:new({ name = 'xxdd', age = 111, height = 111 })
print(me2:toString())

me3 = Person:new({ name = 'gggg', age = 222, height = 222 })
function me3.toString () print('m3.tostring') end
print(me3:toString())